package com.home.cop.employee.mapper;

import com.home.cop.employee.model.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SysUserMapper {
    public SysUser getUser(@Param("account") String account,@Param("pass") String pass);

    public List<SysUser> list(Map<String,Object> params);

    public List<SysUser> getUserByPhone(@Param("phone") String phone);

    public List<SysUser> getInstUsers(@Param("instId") Integer instId);

    /**
     * 删除系统用户
     * @param account
     */
    public void deleteSysUser(@Param("account") String account);

    /**
     * 新增用户
     * @param user
     */
    public void insert(SysUser user);

    /**
     * 修改系统用户信息
     * @param user
     */
    public void updateUserInfo(SysUser user);

    /**
     * 启用/禁用用户
     * @param account
     * @param status
     */
    public void updateStatus(@Param("account")String account,@Param("status")Integer status);

    public Integer countUserByRoleId(@Param("roleId") Integer roleId);


    /**
     * 修改用户密码
     * @param account
     * @param pass
     */
    public void updateUserPass(@Param("account") String account,@Param("pass") String pass);
}